package com.lzj.demo.design.abstractfactory;

import lombok.Data;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

@Data
public class IIR {
    private Map<String,String> dateMap = new ConcurrentHashMap<>();
    public String get(String key) {
        return dateMap.get(key);
    }

    public void set(String key, String value) {
        dateMap.put(key,value);
    }

    public void setEx(String key, String value, long timeout, TimeUnit timeUnit) {
        dateMap.put(key,value);
    }

    public void delete(String key) {
        dateMap.remove(key);
    }
}
